import request from '@/utils/request'

/**
 * 查询轮播图信息
 * @returns {AxiosPromise}
 */
export function queryAllCarousel() {
  return request({
    url: 'rest/config/api/carousel/all',
    method: 'get'
  })
}

/**
 * 查询应用信息
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllApplication(params) {
  return request({
    url: 'rest/config/api/application/all',
    method: 'get',
    params
  })
}

/**
 * 查询热门推荐服务
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllHotService(params) {
  return request({
    url: 'rest/config/api/hots/all',
    method: 'get',
    params
  })
}

/**
 * 查询最新服务
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllNewService(params) {
  return request({
    url: 'rest/config/api/news/all',
    method: 'get',
    params
  })
}

/**
 * 查询热门服务
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllHotsService(params) {
  return request({
    url: 'rest/config/api/hot/all',
    method: 'get',
    params
  })
}

/**
 * 查询专项服务
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllSpecial(params) {
  return request({
    url: 'rest/config/api/special/all',
    method: 'get',
    params
  })
}

/**
 * 统计部门
 * @returns {AxiosPromise}
 */
export function queryCountServiceOrgAll() {
  return request({
    url: 'rest/config/api/service/org/count',
    method: 'get'
  })
}

/**
 * 统计全部可用服务数
 * @returns {AxiosPromise}
 */
export function queryCountAllService() {
  return request({
    url: 'rest/config/api/service/all/count',
    method: 'get'
  })
}

/**
 * 查询全部在线办理服务数
 * @returns {AxiosPromise}
 */
export function queryCountAllZxblService() {
  return request({
    url: 'rest/config/api/service/all/zxbl',
    method: 'get'
  })
}

/**
 * 查询全部服务的访问量
 * @returns {AxiosPromise}
 */
export function queryCountServiceFwl() {
  return request({
    url: 'rest/config/api/service/all/visit',
    method: 'get'
  })
}

/**
 * 查询统计全部待办流程数
 * @returns {AxiosPromise}
 */
export function queryCountPmDb() {
  return request({
    url: 'rest/config/api/service/pm/db',
    method: 'get'
  })
}

/**
 * 查询统计全部已完成流程数量
 * @returns {AxiosPromise}
 */
export function queryCountPmYwc() {
  return request({
    url: 'rest/config/api/service/pm/ywc',
    method: 'get'
  })
}

/**
 * 查询全部终止流程数
 * @returns {AxiosPromise}
 */
export function queryCountPmZz() {
  return request({
    url: 'rest/config/api/service/pm/zz',
    method: 'get'
  })
}

/**
 * 查询全部事务追踪相关统计
 * @returns {AxiosPromise}
 */
export function queryAllCount() {
  return request({
    url: 'rest/config/api/service/pm/count',
    method: 'get'
  })
}

/**
 * 查询流程最近7天访问次数
 * @returns {AxiosPromise}
 */
export function queryAllServiceVital() {
  return request({
    url: 'rest/config/api/service/vital',
    method: 'get'
  })
}

/**
 * 查询排序前7的服务
 * @returns {AxiosPromise}
 */
export function queryAllServiceOrder() {
  return request({
    url: 'rest/config/api/service/order',
    method: 'get'
  })
}

/**
 * 保存访问记录
 * @returns {AxiosPromise}
 */
export function saveSystemVital() {
  return request({
    url: 'rest/config/api/system/vital',
    method: 'post'
  })
}

/**
 * 查询用户访问记录统计
 * @returns {AxiosPromise}
 */
export function querySystemVital() {
  return request({
    url: 'rest/config/api/system/vital',
    method: 'get'
  })
}
